package DateFormatUtils

import "time"

const (
	DATEFORMAT_yyyyMMddHHmmss = "20060102150405"
	DATEFORMAT_yyyyMMdd = "20060102"
	DATEFORMAT_yyyyMM = "200601"
	DATEFORMAT_yyyy = "2006"
	DATEFORMAT_yyyyMMddHHmmss_="2006-01-02 15:04:05"
	DATEFORMAT_yyyyMMdd_ = "2006-01-02"
	DATEFORMAT_yyyyMM_ = "2006-01"
	DATEFORMAT_yyyyMMddHHmmssC = "2006年01月02日15时04分05秒"
)

func Format(value string,oldFormat string,newFormat string)(string){
	var d,err = time.Parse(oldFormat,value)
	if(err!=nil){
		return value
	}
	return d.Format(newFormat)
}
